package com.cn.wanxi.util;

public class Tool {
    public static Integer stringToInt(String value) {
        int result = 0;
        try {
            result = Integer.parseInt(value);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return result;
    }
    public static Integer curPage(String value) {
        int result = 1;
        try {
            result = Integer.parseInt(value);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return result;
    }
    public static Integer pageSize(String value) {
        int result = 10;
        try {
            result = Integer.parseInt(value);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return result;
    }
    public static Double stringToDouble(String value) {
        Double result = 0.0;
        try {
            result = Double.parseDouble(value);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return result;
    }
}
